#ifndef ROUTETYPES_H_INCLUDED
#define ROUTETYPES_H_INCLUDED

#include <iostream>
#include <string>

//RouteTypes.h - wrappers for route components represented in the SQLite database
//Allows data entities to be easily stored, recalled and manipulated in memory

using namespace std;

enum VehicleStates{ //A type that stores the discrete states that a vehicle can be in
                    //at any particular time, used as triggers between the state machines
    ATE_STATE_AT_NODE=1,
    ATE_STATE_ON_LINK=2,
    ATE_STATE_OUT_OF_SERVICE=4,
    ATE_STATE_DELAY=8,
    ATE_STATE_FAULTED=16
};

struct Path{//A Path is two nodes connected by a link.
             //It is a convenient way of expressing the many-to-many relationship
             //between nodes, graphs, and the route(s) they represent

    int startNode;
    int endNode;
    int link;
    int order;
};


struct Node{//A geographical point that represents a location of some importance to the
             //bus route, not only a bus stop, but a waiting point or trigger for an event
             //of some sort

    int nodeId;
    string name;
    float latitude;
    float longitude;
    string type;
    float congestion;
    float eta;
};


struct Link{//An entity that represents the region between two nodes, the most important
             //for calculating ETAs
    int linkId;
    string name;
    float length;
    float congestion;
};

#endif
